import {handleSuccess} from "@/api/index.js";
import {handleError} from "vue";
import http from '@/axios'

export const LawyerApi={
    /**
     * 获取律师列表（分页）
     */
    pagelist(params) {
        return http.get('/api/lawyer/pagelist', {params})
        .then(res => handleSuccess(res, '律师列表获取成功'))
        .catch(error => handleError(error, '律师列表获取失败'))
    },
    /**
     * 更新律师信息
     */
    update(params) {
        return http.post('/api/lawyer/update', params)
        .then(res => handleSuccess(res, '律师信息更新成功'))
        .catch(error => handleError(error, '律师信息更新失败'))
    }
}